#coding=utf-8
import stockdb.sd2db.price2db as pd
import sdsource.dzh.price as dp
from stockdb.misc import *

code = '993124'
name = '医药'

i = SIndex(name)
i.code = code

sess.save(i)
sess.commit()

sess.close()

ps = dp.get_histprices(code)
for p in ps:
    pd.price2db(p, fins='sindex')


